﻿using Newtonsoft.Json;

namespace Gateway.IQuery.Question.Result;

/// <summary>
/// 试题详情
/// </summary>
public class QuestionDetailResult : BaseResult
{
    /// <summary>
    /// 试题标识
    /// </summary>
    public string QuestionId { get; set; }
    /// <summary>
    /// 试题名称
    /// </summary>
    public string QuestionName { get; set; }
    /// <summary>
    /// 试题描述
    /// </summary>
    public string QuestionDescribe { get; set; }

    /// <summary>
    /// 测试用例
    /// </summary>
    public string QuestionCase { get; set; }
    /// <summary>
    /// 测试用例-格式化之后的
    /// </summary>
    public List<QuestionCaseResult> QuestionCaseList => string.IsNullOrEmpty(QuestionCase) ? new List<QuestionCaseResult>() : JsonConvert.DeserializeObject<List<QuestionCaseResult>>(QuestionCase);

    /// <summary>
    /// 试题语言以及代码
    /// </summary>
    public List<QuestionLanguageDetailResult> Languages { get; set; }

}